package jxls;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.sf.jxls.exception.ParsePropertyException;
import net.sf.jxls.transformer.XLSTransformer;

import org.apache.poi.openxml4j.exceptions.InvalidFormatException;

public class Test3 {

	public static void main(String[] args) throws ParsePropertyException, InvalidFormatException, IOException {

		String rootPath = System.getProperty("user.dir");
		String template = rootPath + "/template/template3.xls";  
		String generate = rootPath + "/generate/generate3.xls";  
  
		int[] list = new int[]{1, 2, 3};
		
		List<int[]> list2 = new ArrayList<int[]>();
		list2.add(list);
		list2.add(list);
		list2.add(list);
		
        Map<String, Object> beanParams = new HashMap<String, Object>();  
        beanParams.put("list2", list2);  
        beanParams.put("name", "涂有");  
        XLSTransformer former = new XLSTransformer();  
//        Workbook wb = former.transformXLS(new FileInputStream(template), beanParams);
        former.transformXLS(template, beanParams, generate);
	}

}
